<?php
$servenrname="localhost";
$username="username";
$password="password";
$con= new mysqli($servenrname,$username,$password);
 if ($conn->connect_error);
 die("连接失败".$conn->connect_error);
 echo"连接成功";
 ?>

